package org.compactmvc.demo
{
	import org.compactmvc.patterns.Controller;
	
	import flash.events.IEventDispatcher;
	
	import org.compactmvc.demo.controller.ButtonClickedCommand;
	import org.compactmvc.demo.controller.SettingsLoadedCommand;
	import org.compactmvc.demo.model.ApplicationModel;
	import org.compactmvc.demo.model.MainViewModel;
	
	public final class ApplicationController extends Controller
	{
		public static const NAME:String = 'ApplicationController';
		public static const PATH_SETTINGS:String = "includes/settings.xml";
		public static const PATH_SETTINGS2:String = "includes/settings2.xml";
		
		public static const SETTINGS_LOADED:String = "settingsLoaded";
		public static const BUTTON_CLICKED:String = "buttonClicked";
		
		public function ApplicationController(controllerName:String=null)
		{
			super(NAME);
		}
		
		override public function registerHandler():void
		{
			//models
			registerModel(ApplicationModel.NAME, ApplicationModel);
	
			//commands
			registerCommand(SETTINGS_LOADED, SettingsLoadedCommand);
			registerCommand(BUTTON_CLICKED, ButtonClickedCommand);
		}
		
		
	}
}